package com.example.mideaoem.data;

import android.util.Log;

public class DeviceStatus extends BaseDevice{

	@Override
	public String toString() {
		
		return "设备状态:  开关机="+powerStatus+"   \n设定温度="+setTemperature+"   \n温度单位="+tempUnit+"  \n上下风="+updownFan+"   \n左右风="+leftRightFan+
				"   \n风速="+fanSpeed+"   \n模式="+mode+
				"   \n强劲="+tubro+"   \nECO="+eco+"   \n定时开机/时="+timer_on_hour+"   \n定时开机/分="+timer_on_min
				+"   \n定时关机/时="+timer_off_hour+"   \n定时关机/分="+timer_off_min+"  \n室内="+ indoor_temp+"  \n室外="+outdoor_temp+"  \n8度制热"+Eight_Hot
				+"    \n尘满"+dusFull+"  \n清除尘满"+cleanFanTime;
	}
	
	
	public DeviceStatus() {
	}
	
	public DeviceStatus(DeviceStatus newStatus){
		if(newStatus != null){
		powerStatus = newStatus.powerStatus;
		setTemperature = newStatus.setTemperature;
		mode = newStatus.mode;
		fanSpeed = newStatus.fanSpeed;
		timer_on_hour = newStatus.timer_on_hour;
		timer_on = newStatus.timer_on;
		timer_off_hour = newStatus.timer_off_hour;
		timer_off = newStatus.timer_off;
		timer_off_min = newStatus.timer_off_min;
		timer_on_min = newStatus.timer_on_min;
		updownFan = newStatus.updownFan;
		leftRightFan = newStatus.leftRightFan;
		eco = newStatus.eco;
		tempUnit = newStatus	.tempUnit;
		tubro = newStatus.tubro;
		cleanFanTime = newStatus.cleanFanTime;
		dusFull = newStatus.dusFull;
		Eight_Hot = newStatus.Eight_Hot;
		indoor_temp = newStatus.indoor_temp;
		outdoor_temp = newStatus.outdoor_temp;
		sleepFunc = newStatus.sleepFunc;
		catchCold = newStatus.catchCold;
		
		Log.d("sleepFunc", "设置 sleepFunc = "+sleepFunc);
		}
	}
	
	public void setDeviceStatus(DeviceStatus newStatus) {
		powerStatus = newStatus.powerStatus;
		setTemperature = newStatus.setTemperature;
		mode = newStatus.mode;
		fanSpeed = newStatus.fanSpeed;
		timer_on_hour = newStatus.timer_on_hour;
		timer_on = newStatus.timer_on;
		timer_off_hour = newStatus.timer_off_hour;
		timer_off = newStatus.timer_off;
		timer_off_min = newStatus.timer_off_min;
		timer_on_min = newStatus.timer_on_min;
		updownFan = newStatus.updownFan;
		leftRightFan = newStatus.leftRightFan;
		eco = newStatus.eco;
		tempUnit = newStatus	.tempUnit;
		tubro = newStatus.tubro;
		cleanFanTime = newStatus.cleanFanTime;
		dusFull = newStatus.dusFull;
		Eight_Hot = newStatus.Eight_Hot;
		indoor_temp = newStatus.indoor_temp;
		outdoor_temp = newStatus.outdoor_temp;
		sleepFunc = newStatus.sleepFunc;
		
		Log.d("sleepFunc", "设置 sleepFunc = "+sleepFunc);
	}
	
	
	
	public byte protocol;
	
	/**
	 * 开关机 POWER_ON/POWER_OFF
	 */
	public byte powerStatus;		//开机状态
	protected byte controlSrc;		//控制来源
	protected byte imodeResume;		//i模式恢复
	protected byte childSleepMode;	//儿童睡眠模式
	protected byte timerMode;			//定时模式
	protected byte test2;				//快检
	protected byte keyStatus;			//按键状态
	
	/**
	 * 设定温度 17-23
	 */
	public int setTemperature;	//设定温度
	protected byte setTemperature_dot;//设定温度-小数 0.5
	
	/**
	 * 模式 0-无效 1-自动 2-制冷 3-抽湿 4-制热 5-送风
	 */
	public byte mode;				
	
	/**
	 * 风速 40-低风 60-中风 80-高风 102-自动风
	 */
	public byte fanSpeed;			//风速  固定风-0x65
	protected byte timerEffe;			//移动终端定时有效
	
	/**
	 * 定时开，单位小时 0-23
	 */
	public byte timer_on_hour;		//定时开-时
	
	/**
	 * 定时开 功能  ON/OFF
	 */
	public byte timer_on;			//定时开功能
	
	/**
	 * 定时关，单位小时 0-23
	 */
	public byte timer_off_hour;	//定时关-时
	
	/**
	 * 定时关 功能  ON/OFF
	 */
	public byte timer_off;			//定时关功能
	
	/**
	 * 定时关，单位分钟 0-60
	 */
	public byte timer_off_min;	//定时关-分 
	
	/**
	 * 定时关，单位分钟 0-60
	 */
	public byte timer_on_min;		//定时开-分 
	
	protected byte keyBtn;			//实体键控制
	/**
	 * 上下风 ON/OFF
	 */
	public byte updownFan;			//上下风
	/**
	 * 左右风 ON/OFF
	 */
	public byte leftRightFan;		//左右风
	
	protected byte cosySleep;			//舒睡	00-无舒睡 01-舒睡1 02-舒睡2 03-舒睡3 
	protected byte alarmSleep;		//闹铃睡眠
	protected byte save;				//省电	
	protected byte lowFerqFan;		//睿风	
	protected byte superFan;			//强劲	
	protected byte powerSaver;		//节能
	protected byte feelOwn;			//随身感
	
	
	protected byte wiseEye;			//智慧眼
	protected byte exchangeAir;		//换气
	protected byte dryClean;			//干燥
	public byte ptcAssis;			//电辅热
	protected byte ptcButton;			//电辅热按钮
	protected byte cleanUp;			//净化
	protected byte changeCosySleep;	//切换舒睡曲线
	/**
	 * ECO ON/OFF
	 */
	public byte eco;				//ECO
	
	public byte sleepFunc;			//Sleep功能状态
	/**强劲*/
	public byte tubro;				//TUBRO涡轮
	public byte tempUnit;			//温度单位
	protected byte catchCold;			//防着凉
	protected byte nightLight;		//小夜灯
	protected byte peakElec;			//峰谷节电
	public byte dusFull;			//满尘
	
	
	public byte errInfo;
	
	/**
	 * 清除风机运行时间 TRUE/FALSE
	 */
	public byte cleanFanTime;		//清除风机运行时间

	protected byte naturalFan;		//自然风
	protected byte pmvFunc_H;			//PMV功能
	
	protected byte pmvFunc_L;			//PMV功能
	
	protected byte setExpand_dot;			//设置扩展温度-小数
	protected byte setExpand;				//设置扩展温度
	protected byte double_temp;			//双温控制
	public byte Eight_Hot;				//8度制热
	
	
	/*****    返回数据特有    *****/
	protected byte errMark;//
	protected byte selfFeelOwn;//本机随身感
	protected byte coolFan;//凉风感
	
	public int indoor_temp;//室内温度
	public int outdoor_temp;//室外温度
	
	protected int expand_temp;//扩展温度
	protected byte pwmMode;//pwm 模式
	protected byte light;//灯光
	
	protected byte T1_dot;//T1温度小数位
	protected byte T4_dot;//T4温度小数位
	
	/*********0x41**********/
	protected byte setCmd;//电量设置命令
	protected byte clearCmd;//清零命令
	protected byte resetCmd;//矫正命令
	protected byte addupCmd;//补偿命令
	protected byte runmodeCmd;//电量运行模式命令
	protected byte setallusageCmd;//设置电量总量命令
	
	protected byte powerValue1;//
	protected byte powerValue2;//
	protected byte powerValue3;//
	
	protected byte time1;
	protected byte timeLimit;//时间限制
	protected byte time3;
	
	
	
	
}